package utils.jaxb;

import java.text.SimpleDateFormat;
import java.util.Date;

import javax.xml.bind.annotation.adapters.XmlAdapter;

public class DateTimeAdapter extends XmlAdapter<String, Date>{
	private SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS z");
    @Override  
    public Date unmarshal(String v) throws Exception {  
    	return sdf.parse(v);
    }  
  
    @Override  
    public String marshal(Date v) throws Exception {  
        return sdf.format(v);  
    }  
  
}
